<?php

use Drupal\shusy_gift_card\Entity\ShusyGiftCard;
use Drupal\shusy_store\Entity\ShusyStore;

function shusy_gift_card_shusy_gift_card_add_page() {
  $e = new ShusyGiftCard();
  module_load_include('inc', 'shusy_gift_card', 'shusy_gift_card.forms');
  return drupal_get_form('shusy_gift_card_shusy_gift_card_entity_form', $e, 'add');
}

function shusy_gift_card_shusy_gift_card_view_page(ShusyGiftCard $e) {
  return entity_view($e->entityType(), [$e]);
}

function shusy_gift_card_shusy_gift_card_edit_page(ShusyGiftCard $e) {
  module_load_include('inc', 'shusy_gift_card', 'shusy_gift_card.forms');
  return drupal_get_form('shusy_gift_card_shusy_gift_card_entity_form', $e, 'edit');
}

function shusy_gift_card_shusy_gift_card_delete_page(ShusyGiftCard $e) {
  module_load_include('inc', 'shusy_gift_card', 'shusy_gift_card.forms');
  return drupal_get_form('shusy_gift_card_shusy_gift_card_delete_form', $e);
}

function shusy_gift_card_shusy_store_provide_page(ShusyStore $store) {
  $e = new ShusyGiftCard();
  $e->uid = $store->uid;
  module_load_include('inc', 'shusy_gift_card', 'shusy_gift_card.forms');
  return drupal_get_form('shusy_gift_card_shusy_store_provide_form', $e);
}
